﻿package com.findMoneyGame {
	
	import flash.display.MovieClip;
	import flash.events.Event;
	
	import com.findMoneyGame.models.Model;
	import com.findMoneyGame.models.User;

	
	public class CoinsBalance extends MovieClip {
		
		private function get user () { return User.getInst(); }
		
		public function CoinsBalance() {
			user.addEventListener(Model.UPDATE, function (e : Event) { refresh(); });
			refresh();
		}
		private function refresh () { label.text = user.moneyCount.toString(); }
		
	}
	
}
